import { reqUsernameListInfo } from "@/api/user";

const state = {
    username:[]
}
const mutations = {
    SET_USERNAMELIST(state,username){
        state.username = username
    }
}
const actions = {
    async usernameListInfo({commit},{page,limit,username}){
        try{
            const result = await reqUsernameListInfo(page,limit,username)
            console.log(result)
            commit('SET_USERNAMELIST',result)
        }catch(error){
            alert('请求获取失败')

        }
    },
}
const getters = {}

export default {
    state,mutations,actions,getters
}
